import request from '@/utils/request'

// 查询入库单头列表
export function listHeader(query) {
  return request({
    url: '/api/inboundOrder/page',
    method: 'get',
    params: query
  })
}

// 查询入库单头详细
export function getHeader(inboundOrderCode) {
  return request({
    url: '/api/inboundOrder/detail/' + inboundOrderCode,
    method: 'get'
  })
}

// 新增入库单头
export function addHeader(data) {
  return request({
    url: '/api/inboundOrder/add',
    method: 'post',
    data: data
  })
}

// 修改入库单头
export function updateHeader(data) {
  return request({
    url: '/api/inboundOrder/update',
    method: 'post',
    data: data
  })
}

// 删除入库单头
export function delHeader(inboundOrderCode) {
  return request({
    url: '/api/inboundOrder/delete/' + inboundOrderCode,
    method: 'post'
  })
}
